package com.sishu.njrtsdms.domain.dto;


import com.sishu.njrtsdms.domain.core.Groups;

import org.jooq.types.ULong;

import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Builder;

/**
 * 用户信息传输类
 *
 * @param username         用户名
 * @param password         密码
 * @param realName         真实姓名
 * @param jobNumber        工号
 * @param email            邮箱
 * @param phone            手机号
 * @param userTypeDictId   用户类型字典数据id
 * @param isDeleted        是否删除
 * @param userStatusDictId 状态类型字典数据id
 * @param collegeId        学院id
 */
@Builder
public record UserDTO(

        @Size(min = 1, max = 50, message = "用户名最少一个字符,最多50个字符",
                groups = {Groups.Add.class, Groups.Update.class})
        @NotNull(message = "用户名不可为空", groups = {Groups.Add.class})
        String username,
        @Size(min = 1, max = 80, message = "密码最少一个字符,最多80个字符",
                groups = {Groups.Add.class, Groups.Update.class})
        String password,
        @Size(min = 1, max = 50, message = "真实姓名至少一个字符,最多50个字符",
                groups = {Groups.Add.class, Groups.Update.class})
        String realName,
        @NotNull(message = "工号不可为空", groups = {Groups.Add.class})
        String jobNumber,
        String email,
        String phone,
        ULong sexDictId,
        ULong userTypeDictId,
        ULong userStatusDictId,
        ULong collegeId,
        Boolean isDeleted

) {

}


